package com.apexsoft.assets.base;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.ArrayList;
import java.util.Collection;

@EqualsAndHashCode(callSuper = false)
@Data
public class PagedArrayList<T> extends ArrayList<T> {
    int total=0;

    public PagedArrayList(Collection<T> collection, int total){
        super(collection);
        setTotal(total);
    }

    public PagedArrayList(){
        super();
    }

    public PagedArrayList(int size){
        super(size);
        setTotal(this.size());
    }

    public PagedArrayList(Collection<T> collection){
        super(collection);
        setTotal(this.size());
    }
}
